Integrand size = 19, antiderivative size = 83 \[ \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx=\frac {3 a x}{8}-\frac {b \log (\cos (c+d x))}{d}-\frac {\cos (c+d x) \sin ^3(c+d x) (a+b \tan (c+d x))}{4 d}-\frac {\cos (c+d x) \sin (c+d x) (3 a+4 b \tan (c+d x))}{8 d} \]
3/8*a*x-b*ln(cos(d*x+c))/d-1/4*cos(d*x+c)*sin(d*x+c)^3*(a+b*tan(d*x+c))/d- 1/8*cos(d*x+c)*sin(d*x+c)*(3*a+4*b*tan(d*x+c))/d
Time = 0.10 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.99 \[ \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx=\frac {3 a (c+d x)}{8 d}-\frac {b \left (-\cos ^2(c+d x)+\frac {1}{4} \cos ^4(c+d x)+\log (\cos (c+d x))\right )}{d}-\frac {a \sin (2 (c+d x))}{4 d}+\frac {a \sin (4 (c+d x))}{32 d} \]
(3*a*(c + d*x))/(8*d) - (b*(-Cos[c + d*x]^2 + Cos[c + d*x]^4/4 + Log[Cos[c + d*x]]))/d - (a*Sin[2*(c + d*x)])/(4*d) + (a*Sin[4*(c + d*x)])/(32*d)
Time = 0.35 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.14, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3042, 4889, 530, 2345, 452, 216, 240}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin (c+d x)^4 (a+b \tan (c+d x))dx\) |
\(\Big \downarrow \) 4889 |
\(\displaystyle \frac {\int \frac {\tan ^4(c+d x) (a+b \tan (c+d x))}{\left (\tan ^2(c+d x)+1\right )^3}d\tan (c+d x)}{d}\) |
\(\Big \downarrow \) 530 |
\(\displaystyle \frac {-\frac {1}{4} \int \frac {-4 b \tan ^3(c+d x)-4 a \tan ^2(c+d x)+4 b \tan (c+d x)+a}{\left (\tan ^2(c+d x)+1\right )^2}d\tan (c+d x)-\frac {b-a \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}\) |
\(\Big \downarrow \) 2345 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \int \frac {3 a+8 b \tan (c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)+\frac {8 b-5 a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )-\frac {b-a \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \left (3 a \int \frac {1}{\tan ^2(c+d x)+1}d\tan (c+d x)+8 b \int \frac {\tan (c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)\right )+\frac {8 b-5 a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )-\frac {b-a \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \left (8 b \int \frac {\tan (c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)+3 a \arctan (\tan (c+d x))\right )+\frac {8 b-5 a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )-\frac {b-a \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle \frac {\frac {1}{4} \left (\frac {1}{2} \left (3 a \arctan (\tan (c+d x))+4 b \log \left (\tan ^2(c+d x)+1\right )\right )+\frac {8 b-5 a \tan (c+d x)}{2 \left (\tan ^2(c+d x)+1\right )}\right )-\frac {b-a \tan (c+d x)}{4 \left (\tan ^2(c+d x)+1\right )^2}}{d}\) |
(-1/4*(b - a*Tan[c + d*x])/(1 + Tan[c + d*x]^2)^2 + ((3*a*ArcTan[Tan[c + d *x]] + 4*b*Log[1 + Tan[c + d*x]^2])/2 + (8*b - 5*a*Tan[c + d*x])/(2*(1 + T an[c + d*x]^2)))/4)/d
3.1.12.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symb ol] :> With[{Qx = PolynomialQuotient[x^m*(c + d*x)^n, a + b*x^2, x], e = Co eff[PolynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 0], f = Coeff[Po lynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 1]}, Simp[(a*f - b*e*x )*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) Int[(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*Qx + e*(2*p + 3), x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGtQ[n, 0] && IGtQ[m, 0] && LtQ[p, -1] && EqQ[n, 1] && IntegerQ[2*p]
Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuot ient[Pq, a + b*x^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*g - b *f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) In t[(a + b*x^2)^(p + 1)*ExpandToSum[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]
Int[u_, x_Symbol] :> With[{v = FunctionOfTrig[u, x]}, With[{d = FreeFactors [Tan[v], x]}, Simp[d/Coefficient[v, x, 1] Subst[Int[SubstFor[1/(1 + d^2*x ^2), Tan[v]/d, u, x], x], x, Tan[v]/d], x]] /; !FalseQ[v] && FunctionOfQ[N onfreeFactors[Tan[v], x], u, x]] /; InverseFunctionFreeQ[u, x] && !MatchQ[ u, (v_.)*((c_.)*tan[w_]^(n_.)*tan[z_]^(n_.))^(p_.) /; FreeQ[{c, p}, x] && I ntegerQ[n] && LinearQ[w, x] && EqQ[z, 2*w]]
Time = 1.73 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.88
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\left (\sin ^{3}\left (d x +c \right )+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+b \left (-\frac {\left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(73\) |
default | \(\frac {a \left (-\frac {\left (\sin ^{3}\left (d x +c \right )+\frac {3 \sin \left (d x +c \right )}{2}\right ) \cos \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+b \left (-\frac {\left (\sin ^{4}\left (d x +c \right )\right )}{4}-\frac {\left (\sin ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\cos \left (d x +c \right )\right )\right )}{d}\) | \(73\) |
risch | \(i b x +\frac {3 a x}{8}+\frac {3 \,{\mathrm e}^{2 i \left (d x +c \right )} b}{16 d}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a}{8 d}+\frac {3 \,{\mathrm e}^{-2 i \left (d x +c \right )} b}{16 d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a}{8 d}+\frac {2 i b c}{d}-\frac {b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}-\frac {b \cos \left (4 d x +4 c \right )}{32 d}+\frac {a \sin \left (4 d x +4 c \right )}{32 d}\) | \(129\) |
1/d*(a*(-1/4*(sin(d*x+c)^3+3/2*sin(d*x+c))*cos(d*x+c)+3/8*d*x+3/8*c)+b*(-1 /4*sin(d*x+c)^4-1/2*sin(d*x+c)^2-ln(cos(d*x+c))))
Time = 0.28 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.89 \[ \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx=-\frac {2 \, b \cos \left (d x + c\right )^{4} - 3 \, a d x - 8 \, b \cos \left (d x + c\right )^{2} + 8 \, b \log \left (-\cos \left (d x + c\right )\right ) - {\left (2 \, a \cos \left (d x + c\right )^{3} - 5 \, a \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, d} \]
-1/8*(2*b*cos(d*x + c)^4 - 3*a*d*x - 8*b*cos(d*x + c)^2 + 8*b*log(-cos(d*x + c)) - (2*a*cos(d*x + c)^3 - 5*a*cos(d*x + c))*sin(d*x + c))/d
\[ \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx=\int \left (a + b \tan {\left (c + d x \right )}\right ) \sin ^{4}{\left (c + d x \right )}\, dx \]
Time = 0.30 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.05 \[ \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx=\frac {3 \, {\left (d x + c\right )} a + 4 \, b \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac {5 \, a \tan \left (d x + c\right )^{3} - 8 \, b \tan \left (d x + c\right )^{2} + 3 \, a \tan \left (d x + c\right ) - 6 \, b}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \]
1/8*(3*(d*x + c)*a + 4*b*log(tan(d*x + c)^2 + 1) - (5*a*tan(d*x + c)^3 - 8 *b*tan(d*x + c)^2 + 3*a*tan(d*x + c) - 6*b)/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d
Leaf count of result is larger than twice the leaf count of optimal. 976 vs. \(2 (77) = 154\).
Time = 0.54 (sec) , antiderivative size = 976, normalized size of antiderivative = 11.76 \[ \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx=\text {Too large to display} \]
1/32*(12*a*d*x*tan(d*x)^4*tan(c)^4 - 16*b*log(4*(tan(d*x)^2*tan(c)^2 - 2*t an(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan (d*x)^4*tan(c)^4 + 24*a*d*x*tan(d*x)^4*tan(c)^2 + 24*a*d*x*tan(d*x)^2*tan( c)^4 + 11*b*tan(d*x)^4*tan(c)^4 - 32*b*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan( d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d* x)^4*tan(c)^2 + 12*a*tan(d*x)^4*tan(c)^3 - 32*b*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1 ))*tan(d*x)^2*tan(c)^4 + 12*a*tan(d*x)^3*tan(c)^4 + 12*a*d*x*tan(d*x)^4 + 48*a*d*x*tan(d*x)^2*tan(c)^2 + 6*b*tan(d*x)^4*tan(c)^2 - 32*b*tan(d*x)^3*t an(c)^3 + 12*a*d*x*tan(c)^4 + 6*b*tan(d*x)^2*tan(c)^4 - 16*b*log(4*(tan(d* x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^4 + 20*a*tan(d*x)^4*tan(c) - 64*b*log(4*(tan(d*x) ^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/(tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + t an(c)^2 + 1))*tan(d*x)^2*tan(c)^2 + 24*a*tan(d*x)^3*tan(c)^2 + 24*a*tan(d* x)^2*tan(c)^3 - 16*b*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/( tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(c)^4 + 20*a*tan(d*x) *tan(c)^4 + 24*a*d*x*tan(d*x)^2 - 13*b*tan(d*x)^4 - 64*b*tan(d*x)^3*tan(c) + 24*a*d*x*tan(c)^2 - 36*b*tan(d*x)^2*tan(c)^2 - 64*b*tan(d*x)*tan(c)^3 - 13*b*tan(c)^4 - 32*b*log(4*(tan(d*x)^2*tan(c)^2 - 2*tan(d*x)*tan(c) + 1)/ (tan(d*x)^2*tan(c)^2 + tan(d*x)^2 + tan(c)^2 + 1))*tan(d*x)^2 - 20*a*ta...
Time = 4.45 (sec) , antiderivative size = 155, normalized size of antiderivative = 1.87 \[ \int \sin ^4(c+d x) (a+b \tan (c+d x)) \, dx=\frac {3\,a\,x}{8}+\frac {b\,\ln \left ({\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}{2\,d}+\frac {3\,b}{4\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}-\frac {5\,a\,{\mathrm {tan}\left (c+d\,x\right )}^3}{8\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}+\frac {b\,{\mathrm {tan}\left (c+d\,x\right )}^2}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )}-\frac {3\,a\,\mathrm {tan}\left (c+d\,x\right )}{8\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \]
(3*a*x)/8 + (b*log(tan(c + d*x)^2 + 1))/(2*d) + (3*b)/(4*d*(2*tan(c + d*x) ^2 + tan(c + d*x)^4 + 1)) - (5*a*tan(c + d*x)^3)/(8*d*(2*tan(c + d*x)^2 + tan(c + d*x)^4 + 1)) + (b*tan(c + d*x)^2)/(d*(2*tan(c + d*x)^2 + tan(c + d *x)^4 + 1)) - (3*a*tan(c + d*x))/(8*d*(2*tan(c + d*x)^2 + tan(c + d*x)^4 + 1))